---
title: State Management
description: Learn to manage AI and UI states using the Vercel AI SDK in your Next.js App Router application
---

# State Management

In this section you will learn how to manage states between the language model on the server, and the user interface on the client. You will learn how to use `createAI` to initiate a context provider that can be used to manage these two states.

You will also learn about the function callbacks that `createAI` supports, which can be used to save and restore the AI and UI state of your application.
